import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)


let defaultCity = '上海'
defaultCity = localStorage.city

const state = {
	city:defaultCity
}
const mutations = {

	cityChange(state,city){
		//state就是数据
		//city就是点击弹出来的城市名
		state.city=city
		localStorage.city = city

	}
}
export default new Vuex.Store({

	state,
	mutations

})


